import request from '@/utils/request'

// 查询供应商信息列表
export function listSupplier(query) {
  return request({
    url: '/manage/examineList',
    method: 'get',
    params: query
  })
}

// 审批供应商信息
export function reviewedSupplier(query) {
  return request({
    url: '/manage/examine',
    method: 'get',
    params: query
  })
}

// 供应商删除
export function delSupplier(ids) {
  const data = {}
  data.ids = ids
  return request({
    url: `/manage/delete/suppliers/`,
    method: 'delete',
    params: data
  })
}

// 上传xls
export function upload(data) {
    return request({
      url: '/file/upload/sss',//url即接口后缀
      method: 'post',
      data: data
    })
  }

  // 供应商查询订单信息列表
export function bidList(query) {
  return request({
    url: '/order/bidList',
    method: 'get',
    params: query
  })
}


// 供应商查看自己填写的询价列表
export function supplierAllQuotation(query) {
  return request({
    url: '/order/allquotation',
    method: 'get',
    params: query
  })
}


// 供应商删除自己填写的询价列表
export function supplierDelOrder(data) {
  return request({
    url: `/order/supplier`,
    method: 'delete',
    params:data
  })
}
// 供应商上传商品询价单
export function supplierUploadOtherOrder(data) {
  return request({
    url: '/file/upload/supplier/other',//url即接口后缀
    method: 'post',
    data: data
  })
}

// 供应商上传工程类询价单
export function supplierUploadProjectOrder(data) {
  return request({
    url: '/file/upload/supplier/project',//url即接口后缀
    method: 'post',
    data: data
  })
}

  // 查询所有子公司类别
  export function typeAllList(query) {
    return request({
      url: '/type/alllist',
      method: 'post',
      params: query
    })
  }